package com.apes.fico.masterdata.gl.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * 功能：现金流量项目
 *
 * @Auther: linwz
 * @Date: 2018/8/13 10:33
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicUpdate
@DynamicInsert
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = "mas_cash_flow")
public class CashFlow extends Model {
    @Id
    @Column(name = "id", length = 8)
    private String id;//编码

    @Column(name = "name",length = 64,nullable = false)
    private String name;//名称

    @Column(name = "valid", columnDefinition = "number(1,0) default 1")
    private boolean valid = true; //有效

    @Column(name = "last_tag",columnDefinition = "number(1,0) default 0")
    private boolean lastTag = false;//末级标记

}
